package com.sky.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDateTime;

@Mapper
public interface ShopStatusMapper {
    /**
     * 获得状态
     * @return
     */
    @Select("select status from shop_status ")
    Integer selectStatus();

    /**
     * 更新状态
     * @param status
     * @param id
     * @param now
     */
    @Update("update shop_status set status=#{status},updater=#{id},update_time=#{now}")
    void setStatus(Integer status, Long id, LocalDateTime now);
}
